package day10.Exer;

public abstract class Diagram {
    private String name;
    public Diagram(){}

    public Diagram(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public abstract double getarea();
    public abstract double getperimeter();
    public void show(){
        System.out.println(getName()+"的面积是"+getarea()+getName()+"的周长是"+getperimeter());
    }
}
